<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script>
        $(function() {
            $("#d01").click(function() {
                alert("asdasd");
            });
            var $d01 = $("#d01").clone(true);
            $("hr").after($d01);
        });
    </script>
    <style>
        #d01 {
            border: crimson 1px solid;
        }
    </style>
</head>

<body>
    <div id="d01">
        <h1>复制元素</h1>
        <p>复制的内容</p>
    </div>
    <hr />
</body>

</html>